package com.ruoyi.web.wx.service.impl;

import java.util.List;

import com.ruoyi.web.wx.entity.CashOutVO;
import com.ruoyi.web.wx.entity.WxUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.wx.mapper.CashOutMapper;
import com.ruoyi.web.wx.entity.CashOut;
import com.ruoyi.web.wx.service.ICashOutService;
import com.ruoyi.common.core.text.Convert;

/**
 * 提现记录 服务层实现
 * 
 * @author ruoyi
 * @date 2019-08-27
 */
@Service
public class CashOutServiceImpl implements ICashOutService 
{
	@Autowired
	private CashOutMapper cashOutMapper;

	/**
     * 查询提现记录信息
     * 
     * @param  id 提现记录ID
     * @return 提现记录信息
     */
    @Override
	public CashOutVO selectCashOutById(String  id)
	{
	    return cashOutMapper.selectCashOutById( id);
	}
	
	/**
     * 查询提现记录列表
     * 
     * @param cashOut 提现记录信息
     * @return 提现记录集合
     */
	@Override
	public List<CashOut> selectCashOutList(CashOut cashOut)
	{
	    return cashOutMapper.selectCashOutList(cashOut);
	}
	
    /**
     * 新增提现记录
     * 
     * @param cashOut 提现记录信息
     * @return 结果
     */
	@Override
	public int insertCashOut(CashOut cashOut)
	{
	    return cashOutMapper.insertCashOut(cashOut);
	}
	
	/**
     * 修改提现记录
     * 
     * @param cashOut 提现记录信息
     * @return 结果
     */
	@Override
	public int updateCashOut(CashOut cashOut)
	{
	    return cashOutMapper.updateCashOut(cashOut);
	}

	/**
     * 删除提现记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteCashOutByIds(String ids)
	{
		return cashOutMapper.deleteCashOutByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<WxUserVO> selectCashOutList1(WxUserVO wxUserVO) {

		{
			return cashOutMapper.selectCashOutList1(wxUserVO);
	}

}

    @Override
    public double selectTotalMoney(String userId) {

		return  cashOutMapper.selectTotalMoney(userId);

    }

	@Override
	public Integer selectTotalCount(String userId) {
		return cashOutMapper.selectTotalCount(userId);
	}

    @Override
    public List<CashOut> selectCashOutList(String startTime, String endTime) {

		return cashOutMapper.selectCashOutListBytime(startTime,endTime);

    }
}
